package com.engine4cloud.tdf.education.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.engine4cloud.tdf.common.core.util.TenantTable;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 学习记录表
 *
 * @author wenjie
 * @date 2024-08-15 15:06:54
 */
@Data
@TenantTable
@TableName("edu_learning_record")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "学习记录表")
public class EduLearningRecordEntity extends Model<EduLearningRecordEntity> {

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private Long id;

    /**
     * 记录编号
     */
    @Schema(description = "记录编号")
    private String code;

    /**
     * 任务编号
     */
    @Schema(description = "任务编号")
    private String taskCode;

    /**
     * 矫正对象编号
     */
    @Schema(description = "矫正对象编号")
    private String studentCode;

    /**
     * 矫正对象姓名
     */
    @Schema(description = "矫正对象姓名")
    private String studentName;

    /**
     * 开始时间
     */
    @Schema(description = "开始时间")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @Schema(description = "结束时间")
    private LocalDateTime endTime;

    /**
     * 时长
     */
    @Schema(description = "时长")
    private BigDecimal duration;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "是否删除")
    private String delFlag;

    /**
     * 租户id
     */
    @Schema(description = "租户id")
    private Long tenantId;

    /**
     * 矫正对象所属部门
     */
    @Schema(description = "矫正对象所属部门")
    private Long deptId;

    /**
     * 矫正对象所属部门名称
     */
    @Schema(description = "矫正对象所属部门名称")
    private String deptName;
}